<?php 
session_start();
//inc dir is relative to current application
//root is defined in application_settings.php
define('ROOT', $_SERVER['DOCUMENT_ROOT']);
define('INC_DIR', ROOT . '/inc');
define('SERVER_URL', 'http://' . $_SERVER['SERVER_NAME']);
define('INC_URL', SERVER_URL . '/inc');
define('SESSIONNAME', $_SERVER['HTTP_HOST']);
//
//files
//sql
define("MYSQL_CLASS", INC_DIR . "/sql/mysql.class.php");
define("MSSQL_CLASS", INC_DIR . "/sql/mssql.class.php");
define("SQL_OBJECT_CLASS", INC_DIR . "/sql/sql_object.class.php");
define("SQL_ABSTRACT_CLASS", INC_DIR . "/sql/sql.abstract.class.php");;

define("AUTHENTICATION", INC_DIR . "/authentication/authentication.class.php");
define("AUTHORIZATION", INC_DIR . "/authorization/authorization.class.php");
define("LOGGER", INC_DIR . "/logging/logger.class.php");
define("COMMON", INC_DIR . "/common/common.php");
define("FILESTORE", INC_DIR . "/filestore/filestore.class.php");
define("DYNFORM", INC_DIR . "/dynamicContent/dynamicForm.class.php");
define('FILEWRITER', INC_DIR . "/filehandling/filewriter.class.php");
define('FILEREADER', INC_DIR . "/filehandling/filereader.class.php");
define('IMAGE', INC_DIR . "/image/image.class.php");
define('EMAIL', INC_DIR . "/mail/mail.class.php");

//common classes
define("PERSON_CLASS", INC_DIR . "/common/classes/person.class.php");
define("ENCRYPTION_CLASS", INC_DIR . "/common/classes/encryption.class.php");
define("LANGUAGE_CLASS", INC_DIR . "/common/classes/language.class.php");
define("DYNAMIC_JS", INC_DIR . "/common/classes/dynamicJS.class.php");

//js files
define('JQUERY_CORE', SERVER_URL . '/inc/js/jquery/core/jquery.js');
define('JQUERY_PLUGIN_DIR', SERVER_URL . '/inc/js/jquery/plugins');
define('COMMON_JS_DIR', SERVER_URL . '/inc/js/common');

//db types
define('MYSQL', 1);
define('MSSQL', 2);
define('ORACLE', 3);

//common constants
define('NEWLINE', "\r\n");
define('ACTIVE', 1);
define('INACTIVE', 0);
define('SUCCESS', 1);
define('ERROR', 0);

//constants for core db
define('DB_CORE', 'core');


include_once(FILEWRITER);
include_once(FILEREADER);
include_once(LOGGER);
include_once(SQL_ABSTRACT_CLASS);
include_once(MYSQL_CLASS);
include_once(MSSQL_CLASS);
include_once(COMMON);
include_once(SQL_OBJECT_CLASS);
include_once(PERSON_CLASS);
include_once(AUTHORIZATION);
include_once(AUTHENTICATION);
include_once(ENCRYPTION_CLASS);
include_once(LANGUAGE_CLASS);
include_once(DYNAMIC_JS);
?>